<script type="text/javascript">
	function doSearchMatchProMember(value) {
		
	}
	
	//表格查询  
	function reloadMatchProMember() {
		var params = matchProMember_list.datagrid('options').queryParams; //先取得 datagrid 的查询参数  
		printLog(params);
		matchProMember_list.datagrid('reload'); //设置好查询参数 reload 一下就可以了  
		matchProMember_list.datagrid('unselectAll');
		matchProMember_list.datagrid('uncheckAll');
	}


	function addMatchProMember() {
		createFromWindow("新增信息", "matchProMember.do?editMatchProMember", "matchProMember.do?saveMatchProMember&matchProArticleId=${matchProArticleId!-1}",
				function(data) {
					reloadMatchProMember();
				});
	}
	
	function deleteMatchProMember() {
		var rows = matchProMember_list.datagrid('getChecked');
	    if (rows&&rows.length>0){
	        $.messager.confirm('询问','你确认要删除吗?',function(r){
	            if (r){
	            	var ids = "";
	            	for(var i=0; i<rows.length; i++){
	            		ids += rows[i].id+",";
	            	}
	                $.post('matchProMember.do?deleteMatchProMemberItems',{ids:ids},function(result){
	                    if (result.success){
	                    	reloadMatchProMember();    
	                    }
	                    showMsg(result.msg);
	                },'json');
	            }
	        });
	    }else {
	    	showMsg("请选择操作记录.");
	    }
	}

	function editMatchProMember() {
		var rows = matchProMember_list.datagrid('getChecked');
		printLog(rows);
		if (rows&&rows.length>0) {
			if(rows.length>1) {
				showMsg('请选择一条操作记录.');
				return;
			}
			createFromWindow("编辑信息", "matchProMember.do?editMatchProMember&matchProMemberId=" + rows[0].id,
					"matchProMember.do?saveMatchProMember", function(data) {
						reloadMatchProMember();
					},true);
		} else {
			showMsg('请选择操作记录.');
		}

	}
	
	
	function clearMatchProMemberSearch() {
		setGridSearchParams('matchProMember_list','matchProMemberSearchForm',true,reloadMatchProMember);
	}
	
	//根据条件查询
	function matchProMemberSearch() {
		setGridSearchParams('matchProMember_list','matchProMemberSearchForm',false,reloadMatchProMember);
	}
	
	function onDblClickMatchProMemberRow(rowIndex, rowData) {
		createFromWindow("编辑信息", "matchProMember.do?editMatchProMember&matchProMemberId=" + rowData.id,
					"matchProMember.do?saveMatchProMember", function(data) {
						reloadMatchProMember();
					},true);
	}
</script>


<div class="easyui-layout" data-options="fit:true">
	<div data-options="region:'center',border:false">
		<@eu.datagrid id="matchProMember_list" toolbar="#matchProMemberlist_search" idField="id"  url="matchProMember.do?loadList&matchProArticleId=${matchProArticleId!-1}" rownumbers="true" 
			 item="com.xdtech.match.vo.MatchProMemberItem"/>
		
		<div id="matchProMemberlist_search">
			<div id="matchProMember_toolbar" style="height: auto">
<!-- 				<@eu.linkbutton showName="新增" shiro="match:matchProMember:add" iconCls="icon-add" onclick="addMatchProMember()"/> -->
<!-- 				<@eu.linkbutton showName="删除" shiro="match:matchProMember:delete" iconCls="icon-remove" onclick="deleteMatchProMember()"/> -->
<!-- 				<@eu.linkbutton showName="编辑" shiro="match:matchProMember:edit" iconCls="icon-edit" onclick="editMatchProMember()"/> -->
			</div>
		</div>
	</div>
</div>